/**
 * 这是手机号码修改
 */

import { Form, Input, Button, Checkbox, Radio } from 'antd';
import styles from './change.less';
import {
  UserOutlined,
  EyeTwoTone,
  EyeInvisibleOutlined,
} from '@ant-design/icons';
import { useState } from 'react';
import http from '@/http/index';
// import {usere} from 'ahooks';
let timmer = null;
export default function IndexPage() {
  const [isPassword, setIsPassword] = useState(1);
  const onChange = (val) => {
    setIsPassword(val.target.value);
  };
  const [timeDown, setTimeDown] = useState(0);

  const getCode = () => {
    console.log(timeDown);
    http.get('/users').then((res) => {
      setUser(res.users);
    });
    if (timeDown) {
      return;
    }
    setTimeDown(60);
    timmer = setInterval(() => {
      console.log(timeDown);
      if (timeDown) {
        setTimeDown(timeDown--);
      } else {
        clearInterval(window.timmer);
      }
    }, 1000);
  };

  return <div className={styles.step1}>这是第二部</div>;
}
